@L}6CD l0C)HCC WhL/h `CmCDiD`  R@P1  Y0@R !L` D  C D     )16CS S)  C)D1 p p 0 C9DI pCDL~CiCDiD`)AIOMAC.LIB -- OSS system I/O macrosAA Support MacrosA 10IOCB2 AYou must include SYSEQU.M65 ahead of th}is!!AX;$6X; These macros are called by the actual I/O macros.9X; to perform the rudimentary register load functions.}8X;BX;LX; MACRO: @CHVX;`6X; Loads IOCB number (parameter 1) into X register.jX;t 7 then a memory location1X; is assumed to} contain the channel number.X; @CH   Q T?T?T?T?>  $> (X;2X;<X; MAC }RO: @CVFX;P:X; Loads Constant or Value into accumultor (A-register)ZX;d+X; If value of parameter 1 is 0-255, @CVn+X; }assumes it's an (immediate) constant.xX;'X; Otherwise the value is assumed to+X; be a memory location (non-zero page). }X;X;X; @CV   Q> Q X;X;X;X;"X; MACRO: @FL,X;65X; @FL is used to e }stablish a filespec (file name)@X;J-X; If a literal string is passed, @FL willT'X; generate the string in line, jump^&X; } around it, and place its addressh/X; in the IOCB pointed to by the X-register.rX;|(X; If a non-zero page label is passed}*X; the MACRO assumes it to be the label.X; of a valid filespec and uses it instead.X;X;X; @FL   } !   @F = Q>4@F PICBADR9 Q>5@FPICBADR9 Q>4  PICBADR9& Q>5 0PICBADR9:D}NA XIO macroAXX;bX; MACRO: XIOlX;v/X; FORM: XIO cmd,ch[,aux1,aux2][,filespec]X;%X; ch is given as in the} @CH macro3X; cmd, aux1, aux2 are given as in the @CV macro+X; filespec is given as in the @FL macroX;5X; performs f}amiliar XIO operations with/for OS/A+X;/X; If aux1 is given, aux2 must also be given8X; If aux1 and aux2 are omitted, }they are set to zero1X; If the filespec is omitted, "S:" is assumedX; XIO  3 % AXIO: wrong number o}f argumentsA  @CH   @CV *PICCOM9;; COMMAND4  > @CV H PICAUX19R @CV \ PICAUX29fp}Q>z PICAUX19 PICAUX29 3 @FL AS:A @@IO @FL @@@IO: CIOA } OPEN macroAX; X; MACRO: OPEN X; (X; FORM: OPEN ch,aux1,aux2,filespec$ X;. %X; ch is given as in the @CH macro8 1}X; aux1 and aux2 are given as in the @CV macroB +X; filespec is given as in the @FL macroL X;V 1X; will attempt to open the }given file name on` /X; the given channel, using the open "modes"j X; specified by aux1 and aux2t X;~ OPEN   &} AOPEN: wrong number of argumentsA    XIO COPN= = = =   XIO COPN= = = =    } A BGET and BPUT macrosA X; X; MACROS: BGET and BPUT X; X; FORM: BGET ch,buf,len X; BPUT ch,buf,le}n( X;2 %X; ch is given as in the @CH macro< .X; len is ALWAYS assumed to be an immediateF 1X; and actual value...never a m}emory addressP /X; buf must be the address of an appropriateZ X; buffer in memoryd X;n +X; puts or gets length bytes to/f}rom thex 0X; specified buffer, uses binary read/write X; X; X; first: a common macro X; @GP @CH  Q> } PICCOM9 Q>4  PICBADR9 Q>5  PICBADR9 Q>4  PICBLEN9 Q>5  PICBLEN9"  CIO, 6 X;@ B}GET J  T ' ABGET: wrong number of parametersA^ h @GP = = =CGBINRr |  X; BPUT   ' AB }PUT: wrong number of parametersA  @GP = = =CPBINR   X; A PRINT macroA X; X; MACRO: PRINT !}X; (X; FORM: PRINT ch[,buffer[,length]] X; !X; ch is as given in @CH macro& (X; if no buffer, prints just a RETURN0 %X;"} if no length given, 255 assumed: X;D 8X; used to print text. To print text without RETURN,N -X; length must be given. See#} OS/A+ manualX X;b 2X; EXCEPTION: second parameter may be a literall .X; string (e.g., PRINT 0,"test"), in whichv -X; case$} the length (if given) is ignored. X; PRINT  3  ( APRINT: wrong number of parametersA    %}  !   @IO = @GP =@IO= =CPTXTR    @GP = ==CPTXTR  @GP = &}= =CPTXTR  * 4 ! > @IO H @GP =@IO==CPTXTRR \ f p X;z A INPUT macroA X; X; MACRO:'} INPUT X; X; FORM: INPUT ch,buf,len X; %X; ch is given as in the @CH macro )X; buf MUST be a proper buffer address(} 6X; len may be omitted, in which case 255 is assumed X; ,X; gets a line of text input to the given 'X; buffer, maximu)}m of length bytes X; INPUT  3 ( AINPUT: wrong number of parametersA$  .@GP = ==*}CGTXTR8B@GP = = =CGTXTRLV`jA CLOSE macroAtX;~X; MACRO: CLOSEX;X; FORM: CLOSE ch+}X;%X; ch is given as in the @CH macroX;X; closes channel chX; CLOSE   ( ACLOSE: wrong number of par,}ametersA @CH  Q>CCLOSE  PICCOM9 CIO(2X;<-X;;;;;;;;;;; END OF IOMAC.LIB ;;;;;;;;;;;;FX;d of thv#AOSS SYSTEM EQUATES FOR ATARIAX;X; FILE = #DN:SYSEQU.ASMX;X;X; I/O CONTROL BLOCK EQUATES$X;)SAV.}EPC ;; SAVE CURRENT ORG+X;.@;;START OF SYSTEM IOCBS3IOCB8X;B-ICHID ;;DEVICE HANDLER IS (SET BY OS)L)ICDN/}O ;;DEVICE NUMBER (SET BY OS)VICCOM ;;I/O COMMAND`ICSTA ;;I/O STATUSjICBADR ;;BUFFER ADDRESSt&ICPU0}T ;;DH PUT ROUTINE (ADR-1)~ICBLEN ;;BUFFER LENGTHICAUX1 ;;AUX 1ICAUX2 ;;AUX 2ICAUX3 ;;AUX 1}3ICAUX4 ;;AUX 4ICAUX5 ;;AUX 5ICAUX6 ;;AUX 6X;'IOCBLEN IOCB;;LENGTH OF ONE IOCBX; X; IOC2}B COMMAND VALUE EQUATESX;COPN;;OPEN CGBINR;;GET BINARY RECORD CGTXTR;;GET TEXT RECORD CPBINR ;;PUT3} BINARY RECORDCPTXTR ;;PUT TEXT RECORD(CCLOSE ;;CLOSE 2CSTAT ;;GET STATUS<X;F7X; DEVICE DEPENDENT COMMAND 4}EQUATES FOR FILE MANAGERPX;ZCREN ;;RENAMEdCERA!;;ERASEnCPRO#;;PROTECTxCUNP$;;UNPROTECTCPOINT%;;PO5}INTCNOTE&;;NOTEX;X; AUX1 VALUES REQD FOR OPENX;OPIN;;OPEN INPUTOPOUT;;OPEN OUTPUTOPUPD ;;O6}PEN UPDATEOPAPND ;;OPEN APPENDOPDIR;;OPEN DIRECTORYX;X;X; EXECUTE FLAG DEFINESX;#EXCYES7};; EXECUTE IN PROGRESS"+EXCSCR@;; ECHO EXCUTE INPUT TO SCREEN,%EXCNEW;; EXECUTE START UP MODE6$EXCSUP ;; COLD ST8}ART EXEC FLAG@X;JX; MISC ADDRESS EQUATESTX;^CPALOC ;; POINTER TO CP/Ah#WARMST;; WAR, START (0=COLD)r#MEMLO9};; AVAIL MEM (LOW) PTR|%MEMTOP;; AVAIL MEM (HIGH) PTR1APPMHI;; UPPER LIMIT OF APPLICATION MEMORY%INITADR:};; ATARI LOAD/INIT ADR!GOADR;; ATARI LOAD/GO ADR(CARTLOC;; CARTRIDGE RUN LOCATIONCIOV;;CIO ENTRY ADR;}EOL;; END OF LINE CHARX;+X; CP/A FUNCTION AND VALUE DISPLACEMSNT#X; (INDIRECT THROUGH CPALOC)X; <}IE. (CPALOC),YX;"CPGNFN;; GET NEXT FILE NAME'CPDFDV;; DEFAULT DRIVE (3 BYTES)2CPBUFP ;; CMD BUFF NEXT CHA=}R POINTR (1 BYTE)CPEXFL ;; EXECUTE FLAG,CPEXFN ;; EXECUTE FILE NAME (16 BYTES)&)CPEXNP;; EXECUTE NOTE/POINT V>}ALUES0CPFNAM!;; FILENAME BUFFER:!RUNLOC=;; CP/A LOAD/RUN ADRD)CPCMDB?;; COMMAND BUFFER (60 BYTES)N&CPCMDGO?};; CP SUBROUTINE VECTORXX;bSAVEPC;; RESTORE PClX; #DN:SYSEQU.ASMX;X;X; I/O CONTROL BLOCK EQUATES$X;)SAV9hBJ#KLD:DE V`hBJ!KL>D:;DE V`hBJ"KLdD:aDE V`hA}BJKLD:DE V`DE V`hBJ!KL>D:;DE V`hBJ"KLdD:aDE V`h!LEȱi`Ȧ B)IOMAC LIBB-SYSEQU M65B@FORMAT OBJBBINTRORUNOBJ